<%@ page import="main.bean.Good" %>
<%@ page import="java.util.List" %>
<%@ page import="main.bean.Order" %>
<%@ page import="main.bean.Detail" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>详单查询显示</title>
</head>
<body bgcolor="CCCFFF">

<%--<br> <br> <br> <br> <br>--%>
<%
    List<Detail> DetailList = (List<Detail>) session.getAttribute("DetailList");
%>
<%--width="600"--%>
<table border="2" bgcolor="CCCEEE"  width="100%"  align="center" style="margin: fill">
    <tr bgcolor="CCCCCC" align="center">
        <th>详单名</th>
        <th>商品名</th>
        <th>商品描述</th>
        <th>数量</th>
        <th>单价</th>
        <th>总价</th>
        <th colspan="2">操作</th>
    </tr>
    <%
        int i = 0;
        for (Detail detail : DetailList) {%>
    <tr>
        <td><%=detail.getDetailId()%>
        </td>
        <td><%=detail.getGoodName()%>
        </td>
        <td><%=detail.getDescription()%>
        </td>
        <td><%=detail.getAmount()%>
        </td>
        <td><%=detail.getPrice()%>
        </td>
        <td><%=detail.getTotal()%>
        </td>
        <%--        <%--%>
        <%--            String role = (String) session.getAttribute("role");--%>
        <%--            if (role.equals("normal")) {--%>
        <%--        %>--%>
        <%--        <td>--%>
        <%--            <a href="${pageContext.request.contextPath}/CartInsertServlet?goodId=<%=good.getGoodId()%>&customerId=<%=(String)session.getAttribute("cId")%>">加入购物车</a>--%>
        <%--        </td>--%>
        <%--        <%} else {%>--%>
        <td><a href="./Pay.jsp?orderId=<%=session.getAttribute("orderIdDelete")%>&detailId=<%=detail.getDetailId()%>">付款</a></td>
<%--        <td><a href="${pageContext.request.contextPath}/DetailSelectServlet?orderId=<%=detail.getDetailId()%>">修改</a></td>--%>
        <%--        <%}%>--%>
    </tr>
    <%
            i++;
        }%>
</table>
</body>
</html>
